remove video transcript enabled flag#17923
remove video transcript enabled flag#17923muhammad-ammar merged 1 commit intotranscripts-phase-2from
Conversation
028a928 to
c675b8c
Compare
|
Your PR has finished running tests. |
dab7440 to
6b7a72a
Compare
|
Your PR has finished running tests. |
6b7a72a to
b6c27a6
Compare
|
Your PR has finished running tests. |
6e1784f to
6784ee7
Compare
b6c27a6 to
0f34796
Compare
|
Your PR has finished running tests. |
6784ee7 to
f2b499e
Compare
0f34796 to
d95fb31
Compare
f2b499e to
82d0968
Compare
|
Your PR has finished running tests. |
82d0968 to
d5758bd
Compare
d95fb31 to
a1e5931
Compare
|
Your PR has finished running tests. |
a1e5931 to
dbec3aa
Compare
|
Your PR has finished running tests. |
dbec3aa to
cc8d288
Compare
|
Your PR has finished running tests. |
|
@mushtaqak This is waiting for your review |
mushtaqak
left a comment
There was a problem hiding this comment.
@muhammad-ammar This is looking great. I have left a few questions and feedback.
Also, I think, openedx.core.djangoapps.video_config.models.VideoTranscriptEnabledFlag.feature_enabled could/may be removed from test_video_handlers.py and lms/djangoapps/mobile_api/video_outlines/tests.py
| subs_filename, | ||
| get_transcript_for_video | ||
| ) | ||
| from .transcripts_model_utils import ( |
There was a problem hiding this comment.
I think we can remove is_val_transcript_feature_enabled_for_course method from transcript_model_utils.py since it is not used anymore now.
| response = self.client.get(self.view_url, content_type='application/json') | ||
| self.assertEqual(response.status_code, 405) | ||
|
|
||
| def test_404_with_feature_disabled(self): |
There was a problem hiding this comment.
This test should be removed as well.
| response = self.client.post(transcript_delete_url) | ||
| self.assertEqual(response.status_code, 405) | ||
|
|
||
| def test_404_with_feature_disabled(self): |
There was a problem hiding this comment.
name of the class should be renamed from TranscriptUploadTest to TranscriptDeleteTest and
@patch(
'openedx.core.djangoapps.video_config.models.VideoTranscriptEnabledFlag.feature_enabled',
Mock(return_value=True)
)
should be removed from the class as well.
| @@ -504,16 +480,6 @@ def test_405_with_not_allowed_request_method(self): | |||
| response = self.client.post(transcript_delete_url) | |||
There was a problem hiding this comment.
Also let's make this consistent with other tests (self.view_url) as we have done for other views
There was a problem hiding this comment.
this is out of scope of this PR :)
There was a problem hiding this comment.
NVM, I found that this is required for has_studio_write_access permission used in delete handler.
| video_transcripts_enabled = VideoTranscriptEnabledFlag.feature_enabled(course_key) | ||
| # User needs to have studio write access for this course. | ||
| if not video_transcripts_enabled or not has_studio_write_access(request.user, course_key): | ||
| if not has_studio_write_access(request.user, course_key): |
There was a problem hiding this comment.
why do we need to check write access here ?
There was a problem hiding this comment.
so that not everyone can delete the transcript
| var view = new PreviousVideoUploadListView({ | ||
| collection: collection, | ||
| videoHandlerUrl: videoHandlerUrl, | ||
| transcriptAvailableLanguages: [], |
There was a problem hiding this comment.
Why are we adding these attributes now ?
|
@mushtaqak feedback addressed. |
|
Your PR has finished running tests. |
| Mock(return_value=False), | ||
| ) | ||
| @patch('xmodule.video_module.VideoModule.get_transcript', Mock(side_effect=NotFoundError)) | ||
| def test_download_fallback_transcript_feature_disabled(self): |
There was a problem hiding this comment.
Do we need this test now ? or it's docstring need to be update?
There was a problem hiding this comment.
let me check this
There was a problem hiding this comment.
Deleted as I don't think we need these now.
| ) | ||
| @patch( | ||
| 'xmodule.video_module.transcripts_utils.edxval_api.get_available_transcript_languages', | ||
| Mock(return_value=['uk']), |
There was a problem hiding this comment.
Is this test test_val_transcript_feature_disabled needed now? or it's docstring need to be update?
There was a problem hiding this comment.
let me check this
There was a problem hiding this comment.
Deleted as I don't think we need these now.
mushtaqak
left a comment
There was a problem hiding this comment.
Looks good except a couple of questions, otherwise 👍
6a8ea29 to
aaaafee
Compare
|
@mushtaqak I have rebased and squashed the PR. Will merge it as soon as build is gree. |
|
Your PR has finished running tests. |
With these changes Transcripts column on Video Uploads page will be enabled by default.
SANDBOX